In utilizing a word processor, it is often helpful to select text. By selecting text, a user can manipulate blocks of text in aggregate. Such manipulations include cutting, formatting, or deleting the selected text. In conventional application programs, text is selected one letter at a time. That is, text is selected with a minimum granularity of a letter (i.e., the smallest increment of selection is a letter).
FIG. 1 depicts an application program utilizing the conventional method for selecting text, where the application program is the Microsoft Word word processor sold by Microsoft Corporation of Redmond, Wash. The application program is displayed to the user as a window 102 on a video display. Within the window 102, the application program displays text 104 to the user. A portion 106 of the text 104 is selected. The selected text 106 extends from an initial endpoint 108 to the current location where the cursor 110 is located. In this sense, the cursor 110 is a marker of an edit position that indicates where input from the keyboard is reflected. When utilizing the application program, the user may utilize an input device to select the text 104 for manipulation. Such an input device may be a keyboard, a mouse or other pointing device. When the input device is a mouse, the movement of the mouse is reflected on the video display as movement of a mouse indicator. Such a mouse indicator is typically reflected on the video display as an arrow and when the mouse indicator is over text, the mouse indicator is reflected as an i-beam. During text selection, however, the mouse movement is reflected as movement of the cursor 110. Therefore, during text selection, the mouse indicator and the cursor 110 are the same and are reflected as an i-beam on the video display.
When selecting the text, the user points the mouse indicator at a desired location, depresses the mouse button, moves the mouse until the desired text is highlighted, and then releases the mouse button. After releasing the mouse button, all of the desired text is highlighted and can then be manipulated by the user. The initial depression of the mouse button at the desired location acts as an initial endpoint 108 for the selection. This initial endpoint 108 is referred to as the "anchor end" of the selection. As the user moves the cursor 110 across the video display, the text between the cursor and the anchor end 108 is highlighted. The end of the selection that typically moves with the cursor 110 is referred to as the "live end." After releasing the mouse button, the last location of the live end 110 becomes fixed and acts as a final endpoint. Thus, the selected text is the text between the initial endpoint and the final endpoint. Using a conventional method for selecting text, the live end of the selection and the cursor 110 correspond to the same location within the text.
FIG. 2 depicts a flowchart of the steps performed by the conventional method for selecting text. The steps depicted are performed after the mouse button has been depressed. After depressing the mouse button, the conventional method sets the anchor end of the selection and the live end of the selection to the character position where the mouse indicator was located when the mouse button was depressed (step 202). A "character position" refers to the nearest location to the mouse indicator that acts as a boundary between two characters. In this sense, the term "character" includes white space. Therefore, in this step, when the mouse indicator points to a portion of a character and the mouse button is depressed, the anchor end and the live end are located at the nearest character position. The conventional method then receives the mouse coordinates (step 204). The "mouse coordinates" refers to the Cartesian coordinates of the mouse indicator relative to the upper left corner of the video display. Typically, the operating system sends messages to the application program that contain the current location of the mouse indicator and the application program stores the messages in a message queue. Therefore, the application program performs this step by querying the message queue for a message containing the current location of the mouse indicator. After receiving the mouse coordinates, the conventional method determines whether the mouse button is still depressed (step 206). If the mouse button is still depressed, the conventional method extends the live end of the selection to the character position where the mouse indicator is currently located (step 208). That is, the conventional method extends the selection to include the current mouse coordinates. After extending the live end, the conventional method returns to request another set of mouse coordinates. However, in step 206, if the mouse button was not depressed, the text selection has been completed and processing returns. After completing the text selection, the user may then manipulate the text selection.
Selecting text on a letter-by-letter basis allows for precision when selecting text. That is, a user may select a few letters and make changes to only the selected letters. However, users typically work with text on a word-by-word basis. Thus, when a user wants to select a few words for manipulation, the user needs to use caution in selecting the initial endpoint and the final endpoint to ensure that the endpoints correspond to the beginning or end of a word. Oftentimes, although a user intended to select an entire word, the user finds that he has selected only a portion of the word or part of a different word. In either case, the user must select the intended word again. Having to reselect a word makes it more difficult to manipulate text, as well as increasing user frustration.